<template>
  <div>
    <el-container style="height: 620px; border: 1px solid #eee">
      <el-aside
        width="232px"
        height="620px"
        style="background-color: rgb(238, 241, 246)"
      >
        <el-menu
          router
          :default-active="$route.path"
          @open="handleOpen"
          @close="handleClose"
        >
          <el-menu-item index="/index/user">
            <span slot="title">用户管理</span>
          </el-menu-item>
          <el-submenu index="/index/soft">
            <template slot="title">
              <span slot="title">软件管理</span>
            </template>
            <el-menu-item-group class="text">
              <el-menu-item index="/index/soft/online">上线</el-menu-item>
              <el-menu-item index="/index/soft/offline">下线</el-menu-item>
              <el-menu-item index="/index/soft/softType">软件类型</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="/index/devloper">
            <template slot="title">
              <span slot="title">开发者管理</span>
            </template>
            <el-menu-item-group class="text">
              <el-menu-item index="/index/devloper/normal">正常</el-menu-item>
              <el-menu-item index="/index/devloper/forbidden"
                >禁用</el-menu-item
              >
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="/index/digital">
            <template slot="title">
              <span slot="title">数码管理</span>
            </template>
            <el-menu-item-group class="text">
              <el-menu-item index="/index/digital/type">类型</el-menu-item>
              <el-menu-item index="/index/digital/brand">品牌</el-menu-item>
              <el-menu-item index="/index/digital/information"
                >信息</el-menu-item
              >
              <el-menu-item index="/index/digital/param">参数</el-menu-item>
              <el-menu-item index="/index/digital/img">图片</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-menu-item index="/index/manager">
            <span slot="title">管理员管理</span>
          </el-menu-item>
          <el-submenu index="/index/dynamic">
            <template slot="title">
              <span slot="title">动态管理</span>
            </template>
            <el-menu-item-group class="text">
              <el-menu-item index="/index/dynamic/sujet">话题</el-menu-item>
              <el-menu-item index="/index/dynamic/commend">评论</el-menu-item>
              <el-menu-item index="/index/dynamic/remark">点评</el-menu-item>
              <el-menu-item index="/index/dynamic/deal">交易</el-menu-item>
            </el-menu-item-group>
            <!-- <el-submenu index="/index/dynamic/commend">
              <template slot="title">评论</template>
              <el-menu-item index="1-4-1">选项4-1</el-menu-item>
            </el-submenu> -->
          </el-submenu>
          <el-menu-item index="/index/advertise">
            <span slot="title">广告管理</span>
          </el-menu-item>
          <el-submenu index="/index/check">
            <template slot="title">
              <span slot="title">审核管理</span>
            </template>
            <el-menu-item-group class="text">
              <el-menu-item index="/index/check/checkSoft"
                >软件审核</el-menu-item
              >
              <el-menu-item index="/index/check/checkDevlop"
                >开发者审核</el-menu-item
              >
            </el-menu-item-group>
          </el-submenu>
          <!-- <el-menu-item index="/index/check">
            <span slot="title">审核管理</span>
          </el-menu-item> -->
          <el-submenu index="/index/inform">
            <template slot="title">
              <span slot="title">举报管理</span>
            </template>
            <el-menu-item-group class="text">
              <el-menu-item index="/index/inform/types">举报类型</el-menu-item>
              <el-menu-item index="/index/inform/massage"
                >举报信息</el-menu-item
              >
            </el-menu-item-group>
          </el-submenu>
          <el-menu-item index="/index/system">
            <span slot="title">系统设置管理</span>
          </el-menu-item>
        </el-menu>
      </el-aside>

      <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <span>王小虎</span>
        </el-header>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script>
import http from '../api/index';
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
  mounted() {
    http.getToken().then((r) => {
      console.log(r);
    });
  },
};
</script>
<style>
body {
  padding: 0;
  margin: 0;
}
.el-header {
  background-color: #d3d5d6;
  color: #333;
  text-align: center;
  line-height: 60px;
  position: sticky;
  top: 0px;
  z-index: 100;
}

.el-aside {
  background-color: white;
  color: #333;
  text-align: center;
  line-height: 200px;
  width: 232px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
}

body > .el-container {
  margin-bottom: 40px;
  /* margin-left: 200px; */
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
.el-menu-vertical-demo {
  width: 215px;
}
.el-menu {
  border: none;
}
/* .el-submenu{
  background-color: blue;
} */
.div1 {
  width: 200px;
}
.text {
  margin-left: 15px;
}
</style>
